<template>
  <div class="scenic-detail">
    <div class="scenic-detail-container">
      <div class="border">
        <div class="name">id：</div>
        <div class="content">{{ info.id }}</div>
      </div>
      <div class="border">
        <div class="name">景区名称：</div>
        <div class="content">{{ info.game_name }}</div>
      </div>
      <div class="border">
        <div class="name">特点：</div>
        <div class="content">{{ info.peculiarity }}</div>
      </div>
      <div class="border">
        <div class="name">封面图片：</div>
        <img :src="info.cover_pic" preview="headurl" preview-text="" alt="" class="image">
      </div>
      <div class="border">
        <div class="name">其他：</div>
        <img v-for="(item, index) of info.other_pics" :key="index" :src="item" preview="detail" preview-text="" alt="" class="image">
      </div>
      <div class="border rich">
        <div class="name">介绍：</div>
        <div class="content" v-html="info.introduct" />
      </div>
      <div class="border">
        <div class="name">添加时间：</div>
        <div class="content">{{ info.create_at }}</div>
      </div>
    </div>
  </div>
</template>
<script>
import { parseTime } from '@/utils'
export default {
  name: 'ScenicDetail',
  data() {
    return {
      info: {}
    }
  },
  created() {
    this.initDetail()
  },
  methods: {
    initDetail() {
      const res = this.$route.query
      res.create_at = parseTime(res.create_at)
      this.info = res
    }
  }
}
</script>
<style lang="scss" scoped>
.scenic-detail{
  width: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  top: 10px;
  z-index: 10;
  padding: 20px;
  padding-top: 0;
  box-sizing: border-box;
  background-color: #fff;
  overflow-y: scroll;
  .scenic-detail-container {
    width: 100%;
    border-top: 1px solid #ebeef5;
    box-sizing: border-box;
    margin-bottom: 20px;
    .border {
      padding: 10px 0;
      border: 1px solid #ebeef5;
      border-top: none;
      width: 100%;
      display: flex;
      align-items: center;
      min-height: 50px;
      box-sizing: border-box;
      .name {
        margin-left: 20px;
        margin-right: 15px;
        min-width: 100px;
      }
      .content {
        line-height: 30px;
      }
      .image{
        width: 80px;
        height: 80px;
        margin-right: 20px;
        cursor: pointer;
      }
    }
    .border.rich{
      height: 100%;
      display: flex;
      align-items: flex-start;
    }
  }
}
</style>
